1. Field of the invention PA1 2. Description of the Related Art
This invention relates to a coding apparatus for a video signal, which is adapted to compress a video signal to transmit it.
Heretofore, in the Japanese Laid Open Patent Application No. 1183/88 publication, in a television telephone system, or a conference telephone system, etc., there is proposed a video signal transmission system adapted for implementing efficient coding to a video signal comprised of a moving picture so that intraframe coded data or interframe coded data is provided to thereby transmit a moving picture video signal through a transmission path in which there is a relatively rigorous restriction for the transmission capacity. In this video transmission system, by making use of the fact that in the case where an attempt is made to transmit respective pictures PC1, PC2, PC3 . . . each constituting a moving picture at time t=t1, t2, t3 . . . as shown in FIG. 5(a), for example, a video signal is characterized in that it has high auto-correlation with respect to the lapse of time, such a processing is carried out to implement compression processing to picture or image data subject to transmission processing to thereby improve the transmission efficiency. As the compression processing of the picture data, there are an intraframe coding processing to compare respective pixel data within respective frames of respective pictures PC1, PC2, PC3 . . . shown in FIG. 5(a) by making use of the auto-correlation between pixel data within the same frame to determine differences therebetween to thereby transmit compressed picture data, and an interframe coding processing to determine picture data PC12, PC23, . . . shown in FIG. 5(b) comprised of differences of pixel data between pictures adjacent in succession like pictures PC1 and PC2, PC2 and PC3, . . . , etc. shown in FIG. 5(a) to transmit them along with picture data subjected to intraframe coding processing with respect to the initial picture PC1 at the time t=t1.
Such a processing for coding a video signal is executed in a picture or image data generator of a structure as shown in FIG. 6, for example.
In FIG. 6, an input video signal VD is delivered to a pre-processing circuit 101. The pre-processing circuit 101 implements pre-processing, e.g., a half field dropping processing and a half field line thinning processing, etc., and the processed input video signal VD is delivered to an A/D converter 102. From the A/D converter 102, transmit unit block (this will be called a macro block hereinafter) data S120 comprised of data of 16 pixels (in a horizontal direction) .times.16 pixels (in a vertical direction) constituting luminance signals and chroma signals is outputted. The macro block data S120 is delivered to a picture or image encoder 106 through a motion detecting unit 105 comprised of a motion detector 103 and a loop filter 104.
Here, it is efficient for those having high correlation in a time base direction of moving pictures to employ a method of encoding differences between respective frames. However, since in the case of a scene -change or a picture having sudden movement or motion, correlation between respective frames becomes lower, an employment of a method of encoding original pictures themselves permits the compression efficiency to be improved to more degree rather than the method of encoding differences. For this reason, the motion detecting unit 105 makes a comparison between data of the current or present frame delivered as the macro block data and predict earlier frame data S133 delivered through the loop filter 104 from a frame memory 116 which will be described later to detect a motion of picture. Then, compensation corresponding to the detected motion is implemented to the predict earlier frame data S133. The data thus obtained is delivered to the picture data encoder 106 as predict current frame data S122. It is to be noted that the loop filter 104 is applied in order to prevent inconveniences of display images or pictures, and is turned ON, e.g., when the above-mentioned motion compensation is carried out.
The picture data encoder 106 performs operations by the following equations (1) to (7) in accordance with the macro block data S120 and the predict current frame data S122 delivered thereto, ##EQU1##
Namely, when it is assumed that a pixel at (i, j) coordinates of a macro block of an original block is A(i, j), a pixel at (i, j) coordinates of a macro block earlier by one block in which a motion compensated motion vector (x, y) is taken into consideration is B(i, j, x, y), and a pixel when the loop filter 104 is applied to the pixel at (i, j) coordinates of the macro block earlier by one frame in which the motion compensated motion vector (x, y) is taken into consideration is FB(i, j, x, y), the picture data encoder 106 first carries out the operation indicated by the above equation (1) to calculate sum of all pixel data within the macro block subject to processing (hereinafter referred to as MWOR) thereafter to carry out the operation indicated by the above equation (2) to calculate sum of squares of all pixel data within the macro block (hereinafter referred to as VAROR1) thereafter to perform the operation indicated by the equation (3) to calculate square of a value (hereinafter referred to as VAR1) obtained by subtracting pixel data of the motion compensated earlier frame macro block from pixel data of a macro block of the current or present frame thereafter to perform the operation indicated by the above equation (4) to calculate square of a value (hereinafter referred to as FVAR1) obtained by subtracting data when the loop filter 104 is applied to pixel data of the motion compensated earlier frame macro block from pixel data of the macro block of the current frame. It is to be noted that in the case where there is no motion compensation in the above equations (3) and (4), x and y are both equal to zero.
Then, the picture data encoder 106 performs the operation indicated by the above equation (5) on the basis of four values MWOR, VAROR1, VAR1 and FVAR1 determined by the above operations to calculate a value (hereinafter referred to as VAROR2) obtained by subtracting a value obtained by dividing the MWOR by 256 from a value obtained by dividing the VAROR1 by 256 (in the case where data processing of the macro block is carried out by 8 bits, for example) to perform the operation indicated by the above equation (6) to calculate a value (hereinafter referred to as VAR2) obtained by dividing the VAR1 by 256 , thereafter to perform the operation indicated by the above equation (7) to calculate a value (hereinafter referred to as FVAR2) obtained by dividing the FVAR1 by 256. In this processing, the VAROR2 represents a weight of the original picture, the VAR2 represents a weight of a predictive error when the loop filter 104 is not applied, and the FVAR2 represents a weight of a predictive error when the loop filter 104 is applied.
In the case where there is no motion compensation, the picture data encoder 106 to check up the value of the VAROR2 and the value of VAR2 with a graph as shown in FIG. 7(a) to output, when the result by checking falls within slanting lines, intra frame coded data (intra data) which is a difference between the macro block data S120 and reference value data, and to output, when the result by checking is outside the slanting lines, intra frame coded data (inter data) which is a difference between the predict current frame data S122 and the macro block data S120. On the other hand, in the case where there is motion compensation, the picture data encoder 106 checks the value of VAROR2 and the value of VAR2 with a graph as shown in FIG. 7(b), for example, to output, when the result by checking falls within slanting lines, that data as intra data, and to output, when the result by checking is outside the slanting lines, that data as inter data. It is to be noted that a threshold level is set in the picture data encoder 106, and that in the case where either the value of VAROR2 or the value of VAR2 or the both values is or are less than 64 as shown in FIGS. 7(a) and (b), the picture data encoder 106 outputs that data as inter data. Inter data or intra data outputted from the picture data encoder 106 is delivered to a transform encoder 107 as difference data S123.
The transform encoder 107 is constituted with a Discrete Cosine Transform circuit (so called DCT), and serves to orthogonally transform the difference data S123 delivered to thereby transform it to efficient coded data to deliver it as transformed coded data S124 to a transmit block setting circuit 108.
The transmit block setting circuit 108 is supplied with a threshold level of a predetermined level, for example. The transmit block setting circuit 108 determines a range of transmission from the transformed coded data S124 delivered thereto to deliver it as transmit block patterned data S125 to a quantizer 109.
The quantizer 109 is supplied with residual data S128 indicating residual of the current or present buffer area delivered from the transmit buffer memory 111. The quantizer 109 quantizes the transmit block patterned data S125 delivered at a quantization step corresponding to the residual data S128 delivered to deliver it as quantized picture data S126 to a retransform encoder 110 and an inverse quantizer 113.
The retransform encoder 110 is comprised of a Variable Length Coding Circuit or encoder (so called a VLC), etc. This retransform encoder 110 implements efficient coding processing to the quantized picture data S126 delivered to deliver it as transmit picture data S127 to the transmit buffer 111. It is to be noted that the retransform encoder 110 serves to drop all the quantized picture data S126 or a portion thereof to thereby carry out so called a frame dropping.
The transmit buffer memory 111 stores the transmit picture data S127 delivered. This stored transmit picture data S127 is read out at a predetermined transmission rate, and is delivered to a multiplexer 112. Further, the transmit buffer memory 111 delivers residual data indicating a residual of the memory area for storing the transmit picture data S127 to the quantizer 109 and the picture data encoder 106. When the quantizer 109 and the picture data encoder 106 knows or recognizes by the residual data delivered thereto that there has been no room in the memory area of the transmit buffer memory 111, they stop coding of picture data and quantization thereof, respectively. Thus, there results a frame dropped state, and an overflow, etc. in the transmit buffer memory 111 is prevented.
The multiplexer 112 synthesizes the transmit picture data S127 delivered from the transmit buffer memory 111 and audio data S129 delivered from an audio data generator 117 to send out this synthesized data to output a transmission path 118.
On the contrary, the inverse quantizer 113 implements inverse quantization to the quantized picture data S126 delivered from the quantizer 109 to deliver it as inverse quantized data S130 to an inverse transform encoder 114 (IDCT).
The inverse transform encoder 114 implements, to the inverse quantized data S130 delivered, an inverse orthogonal transform processing opposite to that of the transform encoder 107 so that inverse orthogonally transformed data is provided, thus to deliver it as inverse transformed coded data S131 to a decoder 115.
The decoder 115 decodes the inverse transformed coded data S131 delivered to thereby deliver, to a frame memory 116, it as coding difference data S132 indicating picture information outputted as the transmit picture data S127.
The predict earlier frame data stored up to that time in the frame memory 116 is subjected to modifying operation by the coding difference data S132 newly delivered. The frame memory 116 stores thereinto the data subjected to modifying operation as new predict earlier frame data S133.
The predict earlier frame data S133 stored into the frame memory 116 is read out by the motion detecting unit 105, and is subjected to motion compensation by the motion compensation circuit 103 as described above, resulting in predict current frame data S122. The frame data thus obtained is delivered to the picture data encoder 106. At times subsequent thereto, the above-described data processing is repeated.
Compressed and coded video data in this way is delivered to a decoding side (not shown) through the transmission path 118, and is reproduced by a decoding processing opposite to that of the above-described coding processing. Thus, e.g., an audio signal is delivered to a speaker, etc., and a video signal is delivered to a monitor device, etc.
However, the above-described coding apparatus for video signal is such that the picture data encoder 106 is adapted to calculate average or variance, etc. for pixels of the macro block by an extensive quantity of operations to discriminate, on the basis of these results of operations, whether video data should be outputted as inter data or should be outputted as intra data. For this reason, it takes much time in carrying out such extensive quantity of operations, and a large number of operational circuits, etc. are required. As a result, the scale of this coding apparatus for video signal itself became large.
Further, the above-mentioned coding apparatus for video signal has to effect a control so as to stop both the picture data encoder 106 and the quantizer 109 in dependency upon a residual of the memory area of the transmit buffer memory 111 in order to prevent an overflow, etc. in the transmit buffer memory 111. For this reason, control points for preventing such overflow, etc. are dispersed, so control becomes complicated. In addition, controls of respective circuits become uncertain.